'use strict';
exports = module.exports = function($scope,$http) {
    $scope.roles1 = [ 'guest', 'user', 'customer', 'admin' ];
    $scope.user1 = { roles: ['user'] };
    $scope.checkAll = function() { $scope.user1.roles = angular.copy($scope.roles1); };
    $scope.uncheckAll = function() { $scope.user1.roles = []; };
    $scope.doAll = function() { if($scope.user.roles.length==4)$scope.uncheckAll();else $scope.checkAll(); };
    $scope.roles2 = [ {id: 1, text: 'guest'}, {id: 2, text: 'user'}, {id: 3, text: 'customer'}, {id: 4, text: 'admin'} ];
    $scope.user2 = { roles: [2, 4] };
    $scope.roles3 = [ {id: 1, text: 'guest'}, {id: 2, text: 'user'}, {id: 3, text: 'customer'}, {id: 4, text: 'admin'} ];
    $scope.user3 = { roles: [$scope.roles3[1]] };
}